//
//  AYSLiveTableViewCell.m
//  AiYingShiProject
//
//  Created by lanou on 15/10/29.
//  Copyright (c) 2015年 李晓理. All rights reserved.
//

#import "AYSLiveTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation AYSLiveTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _picture = [[UIImageView alloc] initWithFrame:CGRectMake(20, 10, 50, 50)];
        [self.contentView addSubview:_picture];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(90, 15, 200, 20)];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        _titleLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_titleLabel];
        
        _playImage = [[UIImageView alloc] initWithFrame:CGRectMake(90, 40, 15, 15)];
//        _playImage.image = [UIImage imageNamed:@"播放1"];
        [self.contentView addSubview:_playImage];
        
        _playName = [[UILabel alloc] initWithFrame:CGRectMake(108, 37, 200, 20)];
        _playName.font = [UIFont systemFontOfSize:12];
        _playName.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_playName];
        
        _markImage = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 50, 28, 25, 25)];
//        _markImage.image = [UIImage imageNamed:@"省略号"];
        [self.contentView addSubview:_markImage];
    }
    return self;
}

- (void)setModel:(AYSLiveModel *)model
{
    _model = model;
    [_picture sd_setImageWithURL:[NSURL URLWithString:model.logo.url]];
    _titleLabel.text = model.name;
    _playName.text = model.current_programs.title;
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
